package com.ruoyi.rsikManage.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.rsikManage.domain.VideoDiagnosisResult;
import com.ruoyi.rsikManage.service.VideoDiagnosisResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RequestMapping("videoDiagnosisResult")
@RestController
public class VideoDiagnosisResultController {
    @Autowired
    VideoDiagnosisResultService videoDiagnosisResultService;
    /**
     * 增
     */
    @PostMapping("add")
    public AjaxResult addVideoDiagnosisResult(@RequestBody VideoDiagnosisResult videoDiagnosisResult) {
        return AjaxResult.success(videoDiagnosisResultService.insertVideoDiagnosisResult(videoDiagnosisResult));
    }

    /**
     * 查
     */
    @GetMapping("select")
    public AjaxResult selectDiagnosisResult() {
        return AjaxResult.success(videoDiagnosisResultService.selectVideoDiagnosisResult());

    }
    /**
     * 改
     */
    @PutMapping("update")
    public AjaxResult updateDiagnosisResult(@RequestBody VideoDiagnosisResult videoDiagnosisResult) {
        return AjaxResult.success(videoDiagnosisResultService.updateVideoDiagnosisResultById(videoDiagnosisResult));
    }

    /**
     * 删
     */
    @DeleteMapping("delete")
    public AjaxResult deleteDiagnosisResultById(Integer id) {
        return AjaxResult.success(videoDiagnosisResultService.deleteVideoDiagnosisResultById(id));
    }

    @DeleteMapping("delete/{ids}")
    public AjaxResult deleteVideoDiagnosisResultByIds(@PathVariable Integer[] ids){
        return AjaxResult.success(videoDiagnosisResultService.deleteVideoDiagnosisResultByIds(ids));
    }
}
